{extend name="public/base" /}
{block name="css"}
{load href="https://ujia-res.oss-cn-shenzhen.aliyuncs.com/common/third-party/swiper/5.0.3/dist/swiper.min.css" /}
<style>
  /* ==========================================================================
    Slider core styles
===========================================================================*/
  *,
  *:before,
  *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }

  .slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    background-color: #444;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  .slider {
    position: relative;
    width: 9999px;
  }
  .slider:before,
  .slider:after {
    display: table;
    content: ' ';
  }
  .slider:after {
    clear: both;
  }
  .slider__item {
    position: relative;
    float: left;
    margin: 0;
    padding: 0;
    height: 100%;
  }
  .slider__item img {
    display: block;
    max-width: 100%;
    height: auto;
  }
  .slider__switch span {
    color: #fff;
    display: block;
    width: 32px;
    height: 32px;
  }
  /* Arrows */
  .slider__switch {
    position: absolute;
    top: 50%;
    margin-top: -20px;
    padding: 10px 5px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
    border-radius: 1px;
    background: #000;
    opacity: .3;
    transition: opacity .15s ease;
    fill: #fff;
  }
  .slider__switch--prev {
    left: 10px;
  }
  .slider__switch--next {
    right: 10px;
  }

  .slider__switch:hover {
    opacity: .85;
  }
  .slider__switch[disabled] {
    visibility: hidden;
    opacity: 0;
  }
  .slider__caption {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: block;
    max-width: 500px;
    padding: 10px;
    color: #fff;
    background: rgba(0, 0, 0, .4);
    box-shadow: 0 0 20px 10px rgba(0,0,0,.4);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#99000000', endColorstr='#99000000'); /* ie8 */
  }
  .slider__caption[disabled] {
    opacity: 0;
    visibility: hidden;
  }
  .slider-nav {
    line-height: 30px;
    position: absolute;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 30px;
    margin: 0;
    padding: 0;
    text-align: center;
    z-index: 99999;
    filter: alpha(opacity=90); /* ie8 */
  }
  .slider-nav__control {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 3px;
    -webkit-transition: background .5s ease;
    -moz-transition: background .5s ease;
    -o-transition: background .5s ease;
    transition: background .5s ease;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
  }

  .slider-nav__control.is-active {
    width: 12px;
    height: 12px;
    background: #fff;
  }
  .slider.has-touch {
    cursor: move;
    cursor: -webkit-grabbing;
    cursor: -moz-grabbing;
  }
  @media (max-width: 580px) {
    .slider__switch {
      display: none;
    }
    .slider__caption {
      display: none;
    }
  }

  .maxWidth {
    max-width: 1200px;
    margin: 0 auto;
  }
  .swiper-container {
    width: 100%;
    height: 100%;
  }
  .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    /* Center slide text vertically */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
  }
  .swiper-container .swiper-button-prev::after {
    content: '';
  }
  .swiper-container .swiper-button-next::after {
    content: '';
  }
  .swiper-container .swiper-button-prev{
    background-image: url('https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/left.png') ;
    left: 15px;
    right: auto;
    width: 30px;
    height: 30px;
    background-size: cover;
  }
  .swiper-container .swiper-button-next{
    background: url('https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/right.png');
    right: 15px;
    width: 30px;
    height: 30px;
    left: auto;
    background-size:cover;
  }

  .case-item {
    background: #6D747B;
    padding: 20px;
    margin-top: 20px;
  }

  .case-item-title {
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 10px;
  }

  .case-item-content {
    position: relative;
  }

  .case-item-content > div:nth-child(1) {
    color: #EAC480;
    margin-bottom: 10px;
    border-bottom: 1px #ccc solid;
    padding-bottom: 10px;
    width: 85%;
  }

  .case-item-content > ul > li {
    margin-top: 10px;
    color: #ffffff;
    font-weight: bold;
    font-size: 15px;
  }

  .case-item-content > ul > li > span{
    font-weight: normal;
    color: #dddddd;
    font-size: 12px;
  }

  .case-item-content > div:last-child {
    position: absolute;
    bottom: 0;
  }

  .detail {
    font-size: 14px;
    background: #323334;
    border: 0;
    padding: 5px 20px;
    color: #ffffff;
  }

  .appointment {
    margin-left: 15px;
    font-size: 14px;
    background: #A83641;
    border: 0;
    padding: 5px 20px;
    color: #ffffff;
  }

  .order-input {
    border: none;
    width: 180px;
    height: 32px;
    padding-left: 10px;
    margin-left: 8px;
  }

  .order-input:nth-child(1) {
    margin-left: 0;
  }

  .order-submit {
    width: 100px;
    background: #B5A055;
    height: 35px;
    color: #fff;
    border: none;
    padding: 0 18px;
    margin-left: 40px;
  }

  .preview {
    margin-top: 20px;
    text-align: center;
    padding: 5px;
  }
  .preview a {
    display: inline-block;
    margin: 5px;
  }
  .preview img {
    display: block;
    width: 200px;
    height: auto;
  }
  .active {
    outline: 3px solid #B5A055;
    box-shadow: 2px 2px 20px 4px rgba(0,0,0,.5);
  }
</style>
{/block}
{block name="main"}
<section class="container-fluid main-container">
  <div style="position: relative">
    <img alt="" class="img-fluid page-banner" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/banner.png">
  </div>

  <div style="background: url('https://res.bestyoujia.com/web/UJGC/index/pc/bmk_bg.png'); background-size: cover; padding: 30px 0 40px">
    <div class="row" style="width: 1100px; margin: 0 auto">
      <h2 style="color: #333; font-size: 24px; text-align: left; font-weight: 400;">全成都已有 <span style="color: #B5A055; font-size: 30px; font-weight: bold">8000</span> 户家庭选择致美优家</h2>
      <div style="display: flex; align-items: center; margin-top: 20px">
        <div style="display: flex; align-items: center"><img alt="" style="width: 20px" src="https://res.bestyoujia.com/web/UJGC/index/h5/baojia/chenghu.png"/><input class="order-input" id="home-username" placeholder="请输入您的称呼"/></div>
        <div style="width: 2px;height: 26px;background: #999999; margin: 0 20px">&nbsp;</div>
        <div style="display: flex; align-items: center"><img alt="" style="width: 20px" src="https://res.bestyoujia.com/web/UJGC/index/h5/baojia/mianji.png"/><input class="order-input" id="home-area" placeholder="请输入您的房屋面积"/>&nbsp;&nbsp;㎡</div>
        <div style="width: 2px;height: 26px;background: #999999; margin: 0 20px">&nbsp;</div>
        <div style="display: flex; align-items: center"><img alt="" style="width: 20px" src="https://res.bestyoujia.com/web/UJGC/index/h5/baojia/dianhua.png"/><input class="order-input" id="home-mobile" placeholder="请输入您的联系方式"/></div>
        <div style="width: 2px;height: 26px;background: #999999; margin: 0 20px">&nbsp;</div>
        <div style="display: flex; align-items: center">
          <img alt="" style="width: 20px" src="https://res.bestyoujia.com/web/UJGC/index/h5/baojia/jijia.png"/>
          <u id="jump-price" style=" width: 80px; margin-left: 8px; color: #333333; font-weight: bold; font-size: 24px">152435</u>
          <span style="font-size: 14px; margin-left: 8px">元</span>
        </div>
        <button class="order-submit">开始计算</button>
      </div>
    </div>
  </div>

  <div class="d-flex flex-column p-t-5">
    <img alt="" class="img-fluid maxWidth mx-auto" style="width: 100%" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/td.png">
  </div>

  <div class="d-flex flex-column p-t-5" style="position: relative;align-items: center">
    <img alt="" class="img-fluid mx-auto" style="width: 100%;" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/zd.png">
  </div>

  <div class="d-flex flex-column p-t-5">
    <img alt="" class="img-fluid maxWidth mx-auto" style="width: 100%" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/zd_point.png">
    <img alt="" class="img-fluid maxWidth mx-auto" style="width: 100%; margin-top: 50px" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/design.png">
  </div>

  <div class="d-flex flex-column p-t-5" style="position: relative;align-items: center">
    <img class="img-fluid mx-auto" style="width: 100%;" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/zp.png">
    <button onclick="showAppointmentPlan('获取全屋规划方案')" style="position: absolute; bottom: 8%;height: 5vmin;width: 20vmin; opacity: 0;">获取全屋规划方案</button>
  </div>

  <div class="d-flex flex-column p-t-5">
    <img class="img-fluid maxWidth mx-auto" style="width: 20%" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/title5.png">
    <img class="img-fluid maxWidth mx-auto" style="width: 100%;margin-top: 30px" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/a.png">
    <img class="img-fluid maxWidth mx-auto" style="width: 100%;margin-top: 20px" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/b.png">
    <img class="img-fluid maxWidth mx-auto" style="width: 100%;margin-top: 20px" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/c.png">
    <img class="img-fluid maxWidth mx-auto" style="width: 100%;margin-top: 20px" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/d.png">
  </div>

  <div class="d-flex flex-column p-t-5" style="position: relative">
    <img class="img-fluid mx-auto" style="width: 100%;" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/designers.png">
    <button onclick="showAppointmentLayer('预约设计服务')" style="position: absolute; bottom: 7.5%;left: 19%; color: #fff; font-size: 18px; height: 4vmin; width: 20vmin; opacity: 1; background: transparent; border: 1px solid #fff">预约设计服务 ></button>
  </div>

  <div class="d-flex flex-column" style="padding-bottom:50px;background: #24282B url('https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/eg_bg.png') no-repeat">
    <img class="img-fluid maxWidth mx-auto p-t-5" style="width: 10%;margin-bottom: 40px" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/title6.png">
<!--    <div style="width: 1000px;margin: 0 auto">-->
<!--      <div class="case-item">-->
<!--        <div class="case-item-title">招商大魔方 | 4室2厅 | 172㎡</div>-->
<!--        <div class="row">-->
<!--          <div class="col-6">-->
<!--            <div class="swiper-container">-->
<!--              <div class="swiper-wrapper">-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case1/eg1_1.png">-->
<!--                </div>-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case1/eg1_2.png">-->
<!--                </div>-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case1/eg1_3.png">-->
<!--                </div>-->
<!--              </div>-->
<!--              <div class="swiper-button-next"></div>-->
<!--              <div class="swiper-button-prev"></div>-->
<!--            </div>-->
<!--          </div>-->
<!--          <div class="col-6 case-item-content">-->
<!--            <div class="case-item-title">现代轻奢 —— 美学整配价：13万</div>-->
<!--            <ul>-->
<!--              <li>⋅成品家具 16件套 6.1万-->
<!--                <br>-->
<!--                <span>含沙发、茶几、电视柜、餐桌、床、床头柜、书椅、床垫</span>-->
<!--              </li>-->
<!--              <li>⋅全屋定制 35㎡ 3.6万</li>-->
<!--              <li>⋅窗帘 7幅 1.3万</li>-->
<!--              <li>⋅精装改造 2万</li>-->
<!--            </ul>-->
<!--            <div>-->
<!--              <button class="detail" onclick="window.location.href='{$Request.root}/case/62.html'" >了解详情></button>-->
<!--              <button class="appointment" onclick="showAppointmentPrice('报名获取方案报价')">报名获取方案报价></button>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </div>-->
<!--      <div class="case-item">-->
<!--        <div class="case-item-title">中海右岸 | 3室2厅 | 83㎡</div>-->
<!--        <div class="row">-->
<!--          <div class="col-6">-->
<!--            <div class="swiper-container">-->
<!--              <div class="swiper-wrapper">-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case2/eg2_1.png">-->
<!--                </div>-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case2/eg2_2.png">-->
<!--                </div>-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case2/eg2_3.png">-->
<!--                </div>-->
<!--              </div>-->
<!--              <div class="swiper-button-next"></div>-->
<!--              <div class="swiper-button-prev"></div>-->
<!--            </div>-->
<!--          </div>-->
<!--          <div class="col-6 case-item-content">-->
<!--            <div class="case-item-title">北欧轻奢 —— 美学整配价：7.8万</div>-->
<!--            <ul>-->
<!--              <li>⋅成品家具 13件套 3.3万-->
<!--                <br>-->
<!--                <span>含沙发、茶几、电视柜、餐桌、餐椅、床、床头柜、床垫</span>-->
<!--              </li>-->
<!--              <li>⋅全屋定制 27㎡ 2.6万</li>-->
<!--              <li>⋅窗帘 4幅 0.8万</li>-->
<!--              <li>⋅精装改造 1.1万</li>-->
<!--            </ul>-->
<!--            <div>-->
<!--              <button class="detail" onclick="window.location.href='{$Request.root}/case/64.html'">了解详情></button>-->
<!--              <button class="appointment" onclick="showAppointmentPrice('报名获取方案报价')">报名获取方案报价></button>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </div>-->
<!--      <div class="case-item">-->
<!--        <div class="case-item-title">世龙广场 | 2室2厅 | 94㎡</div>-->
<!--        <div class="row">-->
<!--          <div class="col-6">-->
<!--            <div class="swiper-container">-->
<!--              <div class="swiper-wrapper">-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case3/eg3_1.png">-->
<!--                </div>-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case3/eg3_2.png">-->
<!--                </div>-->
<!--                <div class="swiper-slide">-->
<!--                  <img class="img-fluid mx-auto" src="https://ujia-img.oss-cn-shenzhen.aliyuncs.com/beauthome/esthetics/pc/case3/eg3_3.png">-->
<!--                </div>-->
<!--              </div>-->
<!--              <div class="swiper-button-next"></div>-->
<!--              <div class="swiper-button-prev"></div>-->
<!--            </div>-->
<!--          </div>-->
<!--          <div class="col-6 case-item-content">-->
<!--            <div class="case-item-title">日式混搭 —— 美学整配价：3.74万</div>-->
<!--            <ul>-->
<!--              <li>⋅成品家具 17件套 3.7万-->
<!--                <br>-->
<!--                <span>含沙发、茶几、电视柜、餐桌、边柜、床、床头柜、书椅、床垫</span>-->
<!--              </li>-->
<!--              <li>⋅灯具 2件 0.04万</li>-->
<!--            </ul>-->
<!--            <div>-->
<!--              <button class="detail" onclick="window.location.href='{$Request.root}/case/59.html'">了解详情></button>-->
<!--              <button class="appointment" onclick="showAppointmentPrice('报名获取方案报价')">报名获取方案报价></button>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </div>-->
<!--    </div>-->
    <div class="container">
      <div class="slider-container">
        <div class="slider">
          <div class="slider__item">
            <img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg1_big.png" alt="">
          </div>
          <div class="slider__item">
            <img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg2_big.png" alt="">
          </div>
          <div class="slider__item">
            <img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg3_big.png" alt="">
          </div>
          <div class="slider__item">
            <img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg4_big.png" alt="">
          </div>
        </div>
        <div class="slider__switch slider__switch--prev" data-ikslider-dir="prev">
          <span><svg xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 20 20"><path d="M13.89 17.418c.27.272.27.71 0 .98s-.7.27-.968 0l-7.83-7.91c-.268-.27-.268-.706 0-.978l7.83-7.908c.268-.27.7-.27.97 0s.267.71 0 .98L6.75 10l7.14 7.418z"/></svg></span>
        </div>
        <div class="slider__switch slider__switch--next" data-ikslider-dir="next">
          <span><svg xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 20 20"><path d="M13.25 10L6.11 2.58c-.27-.27-.27-.707 0-.98.267-.27.7-.27.968 0l7.83 7.91c.268.27.268.708 0 .978l-7.83 7.908c-.268.27-.7.27-.97 0s-.267-.707 0-.98L13.25 10z"/></svg></span>
        </div>
      </div>
      <div class="preview">
        <a href="#1"><img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg1_small.png" alt="" /></a>
        <a href="#2"><img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg2_small.png" alt="" /></a>
        <a href="#3"><img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg3_small.png" alt="" /></a>
        <a href="#4"><img src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/eg4_small.png" alt="" /></a>
      </div>
    </div>
  </div>

  <div class="d-flex flex-column">
    <img class="img-fluid mx-auto" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/sl.png">
    <img class="img-fluid mx-auto" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/flow.png">
    <img class="img-fluid mx-auto" onclick="showAppointmentService()" style="cursor: pointer" src="https://res.bestyoujia.com/web/ZMYJ/esthetics/pc/yy.png">
  </div>
</section>
{/block}
{block name="js"}
{load href="https://ujia-res.oss-cn-shenzhen.aliyuncs.com/common/third-party/swiper/5.0.3/dist/swiper.min.js" /}
<script>
  (function($) {

    'use strict';

    /**
     * Helpers methods
     */

    function supportCSS3(prop) {
      var prefix = ['-webkit-', '-moz-', ''];
      var root = document.documentElement;

      function camelCase(str) {
        return str.replace(/\-([a-z])/gi, function(match, $1) {
          return $1.toUpperCase();
        });
      }
      for (var i = prefix.length - 1; i >= 0; i--) {
        var css3prop = camelCase(prefix[i] + prop);
        if (css3prop in root.style) {
          return css3prop;
        }
      }
      return false;
    }

    function transitionEnd() {
      var transitions = {
        'transition': 'transitionend',
        'WebkitTransition': 'webkitTransitionEnd',
        'MozTransition': 'mozTransitionEnd'
      };
      var root = document.documentElement;
      for (var name in transitions) {
        if (root.style[name] !== undefined) {
          return transitions[name];
        }
      }
      return false;
    }

    function support3d() {
      if (!window.getComputedStyle) {
        return false;
      }
      var el = document.createElement('div'),
        has3d,
        transform = supportCSS3('transform');

      document.body.insertBefore(el, null);

      el.style[transform] = 'translate3d(1px,1px,1px)';
      has3d = getComputedStyle(el)[transform];

      document.body.removeChild(el);

      return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
    }

    var Touch = {
      hasTouch: !!(("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch),
      event: function() {
        return {
          start: (this.hasTouch) ? 'touchstart' : 'mousedown',
          move: (this.hasTouch) ? 'touchmove' : 'mousemove',
          end: (this.hasTouch) ? 'touchend' : 'mouseup',
          leave: (this.hasTouch) ? 'touchleave' : 'mouseout'
        };
      }
    };

    function throttle(func, wait, options) {
      var context, args, result;
      var timeout = null;
      var previous = 0;
      if (!options) options = {};
      var later = function () {
        previous = options.leading === false ? 0 : Date.now();
        timeout = null;
        result = func.apply(context, args);
        if (!timeout) context = args = null;
      };
      return function () {
        var now = Date.now();
        if (!previous && options.leading === false) previous = now;
        var remaining = wait - (now - previous);
        context = this;
        args = arguments;
        if (remaining <= 0 || remaining > wait) {
          if (timeout) {
            clearTimeout(timeout);
            timeout = null;
          }
          previous = now;
          result = func.apply(context, args);
          if (!timeout) context = args = null;
        } else if (!timeout && options.trailing !== false) {
          timeout = setTimeout(later, remaining);
        }
        return result;
      };
    }

    var PLUGIN = 'ikSlider';

    var ikSlider = function(el, options) {

      var settings = $.extend({
        touch: true,
        infinite: false,
        autoPlay: true,
        pauseOnHover: true,
        delay: 10000,
        responsive: true,
        controls: true,
        arrows: true,
        caption: true,
        speed: 300,
        cssEase: 'ease-out'
      }, options || {});

      var $container = el;
      var $slider = $container.find('.slider');
      var $arrows = $container.find('.slider__switch');
      var $caption = $slider.find('.slider__caption');
      var $slide = $slider.find('.slider__item');
      var sliderStyle = $slider.get(0).style;
      var slideLen = $slide.length;
      var slideWidth = $container.outerWidth();
      var sliderWidth = slideLen * slideWidth;
      var current = 0;
      var offset = 0;
      var busy = false;
      var touchFlag = false;
      var $controlPanel;
      var $navControl;
      var timer;

      var transformProperty = supportCSS3('transform');
      var transitionProperty = supportCSS3('transition');
      var has3d = support3d();

      function init() {

        // Calculate dimensions
        _dimmensions();

        if (settings.responsive) {
          $(window).on('resize.' + PLUGIN, throttle(_responsive, 50));
        }

        // If caption false, hide caption
        !settings.caption && $caption.attr('disabled', true);

        // Create nav controls
        settings.controls && _controls();

        if (settings.touch) {
          // if the image img tag set attribute graggable false
          $slide.find('img').attr('draggable', false);
          // Binding touch events
          _touchEnable();
        }

        if (settings.autoPlay) {
          _autoPlay();
          if (settings.pauseOnHover) {
            $container.on('mouseenter.' + PLUGIN, function() {
              clearInterval(timer);
            });
            $container.on('mouseleave.' + PLUGIN, _autoPlay);
          }
        }

        if (settings.arrows) {

          // if infinite setting false hide arrows
          !settings.infinite && _stopinfinite('prev');

          $arrows.on('click.' + PLUGIN, function(e) {
            e.preventDefault();
            if (this.getAttribute('data-ikslider-dir') === 'next') {
              show(current + 1);
            } else {
              show(current - 1);
            }
          });
        } else {
          $arrows.attr('disabled', true);
        }
      }

      function _controls() {
        $controlPanel = $('<div/>', {
          'class': 'slider-nav'
        })
          .appendTo($container);

        var links = [];

        for (var i = 0; slideLen > i; i++) {
          var act = (current === i) ? 'is-active' : '';
          links.push('<a class="slider-nav__control ' + act + '" data-ikslider-control="' + i + '"></a>');
        }
        $controlPanel.html(links.join(''));
        $navControl = $controlPanel.find('.slider-nav__control');
        $controlPanel.on('click.' + PLUGIN, '.slider-nav__control', function(e) {
          e.preventDefault();
          if ($(this).hasClass('is-active')) return;
          show(parseInt(this.getAttribute('data-ikslider-control'), 10));
        });
      }

      function _touchEnable() {
        $slider.addClass('has-touch');
        var touchX;
        var touchY;
        var delta;
        var target;

        $slider.on(Touch.event().start + '.' + PLUGIN, function(e) {
          if (touchFlag || busy) return;

          var touch;
          if (e.originalEvent.targetTouches) {
            target = e.originalEvent.targetTouches[0].target;
            touch = e.originalEvent.targetTouches[0];
          } else {
            touch = e.originalEvent;
            e.preventDefault();
          }

          delta = 0;
          touchX = touch.pageX || touch.clientX;
          touchY = touch.pageY || touch.clientY;
          touchFlag = true;

        });
        $slider.on(Touch.event().move + '.' + PLUGIN, function(e) {
          if (!touchFlag) return;

          var touch;
          if (e.originalEvent.targetTouches) {
            if (e.originalEvent.targetTouches.length > 1 || target !== e.originalEvent.targetTouches[0].target) {
              return;
            }
            touch = e.originalEvent.targetTouches[0];
          } else {
            e.preventDefault();
            touch = e.originalEvent;
          }

          var currentX = touch.pageX || touch.clientX;
          var currentY = touch.pageY || touch.clientY;

          if (Math.abs(touchX - currentX) >= Math.abs(touchY - currentY)) {
            delta = touchX - currentX;
            _move(parseInt(offset, 10) - delta);
          }
        });
        $slider.on(Touch.event().end + '.' + PLUGIN, function(e) {
          if (!touchFlag) return;
          var swipeTo = delta < 0 ? current - 1 : current + 1;

          if (Math.abs(delta) < 50 || (!settings.infinite && (swipeTo > slideLen - 1 || swipeTo < 0))) {
            touchFlag = false;
            _move(offset, true);
            return;
          }
          touchFlag = false;
          target = null;
          show(swipeTo);
        });
        $slider.on(Touch.event().leave + '.' + PLUGIN, function() {
          if (touchFlag) {
            _move(offset, true);
            touchFlag = false;
          }
        });
      }

      function show(slide) {
        if (busy) return;
        if (slide === current) return;
        current = (slide > slideLen - 1) ? 0 : slide;
        if (slide < 0) {
          current = slideLen - 1;
        }

        if (!settings.infinite) {

          $arrows.attr('disabled', false);
          if (slide === slideLen - 1) {
            _stopinfinite('next');
          }

          if (current === 0) {
            _stopinfinite('prev');
          }

        }

        offset = -(slideWidth * (current));

        if (settings.controls) {
          $navControl.removeClass('is-active')
            .eq(current)
            .addClass('is-active');
        }
        busy = true;
        _move(offset, true);

        _triggerChange();
      }

      function _move(value, hasAnimate) {

        if (transitionProperty && transformProperty) {

          (hasAnimate) ?
            sliderStyle[transitionProperty] = transformProperty + ' ' + settings.speed + 'ms ' + settings.cssEase: sliderStyle[transitionProperty] = "none";

          (has3d) ?
            sliderStyle[transformProperty] = 'translate3d(' + value + 'px, 0, 0)': sliderStyle[transformProperty] = 'translateX(' + value + 'px)';

          if (hasAnimate) {
            $slider.one(transitionEnd(), function(e) {
              busy = false;
            });
          } else {
            busy = false;
          }
        } else {
          if (hasAnimate) {
            $slider.animate({
              'margin-left': value
            }, settings.speed, 'linear', function() {
              busy = false;
            });
          } else {
            $slider.css('margin-left', value);
            busy = false;
          }

        }
      }

      // Change event trigger
      function _triggerChange() {
        var eventSlide = $.Event('changeSlide.' + PLUGIN, {
          currentSlide: current
        });
        $container.trigger(eventSlide);
      }

      function _autoPlay() {
        if (timer) clearInterval(timer);
        timer = setInterval(function() {
          if (!touchFlag) {
            show(current + 1);
          }
        }, settings.delay);
      }

      function _stopinfinite(direction) {
        $container.find('.slider__switch--' + direction).attr('disabled', true);
      }

      function _dimmensions() {
        slideWidth = $container.outerWidth();
        sliderWidth = slideLen * slideWidth;

        $slide.css('width', slideWidth);
        sliderStyle['width'] = sliderWidth + 'px';
      }

      function _responsive() {

        if (timer) clearInterval(timer);
        _dimmensions();

        offset = -(slideWidth * current);
        _move(offset);

        settings.autoPlay && _autoPlay();
      }

      function destroy() {
        sliderStyle['width'] = '';
        sliderStyle[transformProperty] = '';
        sliderStyle[transitionProperty] = '';
        $slide.css('width', '');
        if (settings.autoPlay) {
          if (timer) clearInterval(timer);
          $container.off('mouseenter.' + PLUGIN);
          $container.off('mouseleave.' + PLUGIN);
        }
        if (settings.arrows) {
          $arrows.off('click.' + PLUGIN);
          $arrows.attr('disabled', false);
        }
        if (settings.controls) {
          $controlPanel.off('click.' + PLUGIN).remove();
        }

        $caption.attr('disabled', false);

        if (settings.touch) {
          $slider
            .removeClass('has-touch')
            .off(Touch.event().start + '.' + PLUGIN)
            .off(Touch.event().move + '.' + PLUGIN)
            .off(Touch.event().end + '.' + PLUGIN)
            .off(Touch.event().leave + '.' + PLUGIN);
          touchFlag = false;
        }
        if (settings.responsive) {
          $(window).off('resize.' + PLUGIN);
        }
        $container.removeData(PLUGIN);
        $container = null;
        $slider = null;
        $arrows = null;
        $caption = null;
        $slide = null;
        $controlPanel = null;
        $navControl = null;
        sliderStyle = null;
        slideLen = null;
        slideWidth = null;
        sliderWidth = null;
        current = null;
        offset = null;
        busy = null;
        timer = null;
        has3d = null;
        busy = false;
        transformProperty = null;
        transitionProperty = null;
      }

      /**
       * @return {methods} [Public slider methods API]
       */
      return {
        init: init,
        show: show,
        destroy: destroy
      };

    };

    $.fn[PLUGIN] = function(opt) {
      var _this = this;
      this.each(function() {
        var $this = $(this);
        var slider = $this.data(PLUGIN);
        var options = typeof opt === 'object' && opt;
        if (!slider && /(destroy|\d+)/.test(opt)) return;
        if (!slider) {
          slider = new ikSlider($this, options);
          $this.data('ikSlider', slider);
          slider.init();
        }
        if (typeof opt === 'string' || typeof opt === 'number' && opt !== 'init') {
          if (typeof opt === 'number') {
            _this = slider.show(opt);
          } else {
            if(slider[opt]) {
              _this = slider[opt]();
            } else {
              throw new Error('Error:: ikSlider has no method: ' + opt);
            }
          }
        }
        return _this;
      });
    };

  })(jQuery);
</script>
<script>
    $('.navbar-nav').children('li').eq(1).addClass('nav-active');

    const swiper = new Swiper('.swiper-container', {
        autoplay: {
          delay: 3000,
        },
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
    });

    $(".slider-container").ikSlider({
      infinite: true,
      delay: 4000,
      speed: 500
    });
    $(".slider-container").on('changeSlide.ikSlider', function (evt) { console.log(evt.currentSlide); });

    var $preview = $('.preview a');

    function changeActivePreview(i) {
      $('.active').removeClass('active');
      $preview.eq(i).addClass('active');
    }

    $preview.on('click', function(e) {
      e.preventDefault();
      var index = $(this).index();
      $('.slider-container').ikSlider(index);
    });

    $('.slider-container').on('changeSlide.ikSlider', function(e) {
      changeActivePreview(e.currentSlide);
    });

    changeActivePreview(0);

    var priceList = [ 152364, 208664, 127564, 183764, 148726, 242864, 193764, 263134, 282973 ];
    setInterval(function () {
      $('#jump-price').text(priceList[Math.floor(Math.random()*priceList.length)]);
    }, 500);

    $('.order-submit').click(function () {
      window.page_position = '整体软装-开始计算';
      const mobile = $('#home-mobile').val();
      const area = $('#home-area').val();
      switch (validMobile(mobile)) {
        case 3:
          showToast('联系方式不能为空', 'fail');
          break;
        case 1:
          const data = {mobile, area, customer: $('#home-username').val()};

          doAppointment(
            data,
            function(res) {
              console.log('onAppointmentSuccess', res);
              const { data = '' } = res;
              if (data) {
                buryingPoint('APPOINTMENT', data);
                layer.closeAll();
                showToast('预约成功', 'success');
                $('#home-username').val('')
                $('#home-area').val('');
                $('#home-mobile').val('');
              }
            },
            function(err) {
              console.log('onAppointmentError', err);
              layer.closeAll();
              showToast('抱歉，预约失败～', 'fail');
              $('#home-username').val('')
              $('#home-area').val('');
              $('#home-mobile').val('');
            }
          );
          break;
        case 2:
          showToast('手机号码格式不正确', 'fail');
          break;
        default:
          break;
      }
    });
</script>
{/block}